#ifndef __MAINMENU_H
#define __MAINMENU_H

#define K_FIRE 0
#define K_UP 1
#define K_DOWN 2
#define K_LEFT 3
#define K_RIGHT 4

typedef void (*mainmenuPFV)();

typedef struct {
                  int minx,maxx; // player max/min x coords
                  int miny,maxy; // plr max/min y
                  int cminx,cmaxx; // clip x coords
                  int cminy,cmaxy; // clip y coords
                  int wormfrequency;
                  float timemultiplier;
                  int claimpanic; // when to claim at any cost!
                  char allowtable[9*9]; // allowed area
                  
               }  mapsizestructtype;

extern mapsizestructtype *mapsize;

extern int timetick_speed,timetick_delay,timetick_freq;

extern int game_length;
extern int players;
extern char plrkeys[5][8];
extern char controltype[5]; // 0=keyb
extern char plrcontrol[4]; // 0=computer, 1..4=human
extern char plrrace[4]; // race nro

extern int demogame,exitgame,ingame;
extern int auctmessagetime;
extern int citymsgtime;
extern mainmenuPFV start_new_game,update_function;
extern int playerc;
extern char rivi[80],rivi2[80];
extern char *backg,*city;
extern int landgrand_count,landgrand_accelerate;
extern int counter,sellcounter;
extern int delaytime;

extern char *font[5];
extern int fontofs[5][256];
extern char fontwidth[5][256];
extern int cutthroat;

void readjoy();
void mule_mainmenu();
void load_font (char *name, int nro, int sizeapprox);
void writef (int x, int y, char *text, int fnro);
int getflen (char *text, int fnro);
void writemid (int x, int y, char *rivi);
void writemids (int x, int y, char *rivi);
void landgrand_timerrout();
void check_shutdown();
int getk(int plr, int key);
void setk(int plr, int key, int status);
int getkabs(int plr, int key);
void setkabs(int plr, int key, int status);
/*void restore_controlconfig();
void store_controlconfig();*/
void movememo (int x, int y, int xsize, int ysize, char *from, char *to);
void ingamemenu();
void writeleft (int x, int y, char *rivi);

#endif


